package com.vivo.toolkit.stringtoolkit;

import java.util.Map;

public class Util {
	public static String mapToString(Map<Object, Object> map) {
		if (map == null) {
			return "Util.printMap() : map is null;";
		}
		StringBuilder sb = new StringBuilder();
		sb.append("Map : ");
		for (Object key : map.keySet()) {
			Object value = map.get(key);
			sb.append("[ " + key + " : " + value + " ]");
		}
		sb.append("\n");
		return sb.toString();
	}

	public static void printMap(Map<Object, Object> map) {
		System.out.println(mapToString(map));
	}
}
